package ${info.domainPackage};

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import java.util.ArrayList;
import java.util.List;

import ${info.entityPackage}.${info.entityName};

/**
* @author abel.lin
* @date_time ${.now?string("yyyy-MM-dd HH:mm")}
* @description
*/
public class ${info.domainName} extends ${info.entityName} {

    public static ${info.domainName} genDomain(${info.entityName} model){
        if(model == null){
            model = new ${info.entityName}();
        }
        ${info.domainName} domain = JSON.parseObject(JSON.toJSONString(model), ${info.domainName}.class);
        return domain;
    }

    public static List<${info.domainName}> genDomainList(List<${info.entityName}> modelList){
        if(modelList == null){
            modelList = new ArrayList<${info.entityName}>();
        }
        List<${info.domainName}> domainList = JSONArray.parseArray(JSONArray.toJSONString(modelList), ${info.domainName}.class);
        return domainList;
    }

}
